Automattic\WooCommerce\Blocks\StoreApi\Utilities\CartController D

Total Complexity 132
Dependencies 15
Dependents 7
Total lines 1,160
Lines of code 710
Logical lines of code 302
Comment lines 308
Methods 35
Properties 0

Methods 35

Method Rating Maintainability Complexity Lines of code
validate_cart_items()
A
41 11 64
parse_variation_data()
A
43 12 47
apply_coupon()
A
42 8 61
validate_cart_item()
A
48 9 35
validate_add_to_cart()
A
46 7 43
get_cart_item_errors()
A
51 8 27
sanitize_variation_data()
A
49 7 36
stock_exceptions_to_wp_errors()
S
45 5 49
get_shipping_packages()
S
55 6 20
add_to_cart()
S
42 3 63
set_cart_item_quantity()
S
53 5 22
get_error_message_for_stock_exception_type()
S
46 3 51
get_variable_product_attributes()
S
60 4 13
filter_request_data()
S
55 3 20
get_cart_coupon_errors()
S
60 3 13
get_product_for_cart()
S
62 3 11
validate_cart_coupon()
S
59 2 16
load_cart()
S
68 3 7
get_cart_instance()
S
67 3 7
get_package_name()
S
61 2 13
get_variation_id_from_variation_data()
S
60 2 13
get_cart_coupons()
S
74 2 4
get_product_id()
S
78 2 3
add_product_names_to_message()
S
66 2 8
validate_cart_coupons()
S
69 2 7
get_variation_id()
S
79 2 3
get_cart_item()
S
74 2 4
get_product_quantity_in_cart()
S
70 2 6
get_cart_items()
S
74 2 4
select_shipping_rate()
S
69 2 6
empty_cart()
S
77 1 4
get_remaining_stock_for_product()
S
69 1 6
throw_default_product_exception()
S
66 1 10
get_cart_hashes()
S
63 1 10
has_coupon()
S
76 1 4